package com.dao;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.mysql.jdbc.Connection;
import com.mysql.jdbc.PreparedStatement;
import com.user.User;
import com.util.DateBaseUtil;

public class UserDao {
	public void selectuser() throws SQLException{
		Connection conn=DateBaseUtil.getconnection();
		String sql="select *from stuinfo ";
		PreparedStatement ps= (PreparedStatement) conn.prepareStatement(sql);
		ResultSet rs=ps.executeQuery(sql);
		while(rs.next()){
			User s=new User();
			s.setName(rs.getString("name"));
			s.setProject(rs.getString("project"));
			s.setScore(rs.getInt("score"));
			ps.execute();
			ps.close();
		}
		
	}

}
